/* M3U8 Crawler 弹出界面样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  min-width: 360px;
  max-width: 500px;
  background-color: #f5f5f5;
  color: #333;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
}

/* 头部样式 */
.header {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.header p {
  font-size: 12px;
  color: #7f8c8d;
}

/* 操作按钮区域 */
.actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:first-child {
  background-color: #3498db;
  color: white;
}

.btn:first-child:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

/* 搜索过滤区域 */
.filter-section {
  width: 100%;
}

#search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

#search-input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 结果区域 */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.status {
  font-size: 12px;
  color: #7f8c8d;
  text-align: center;
  padding: 8px;
  background-color: #ecf0f1;
  border-radius: 4px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m3u8-item {
  display: flex;
  flex-direction: column;
  background-color: white;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 3px solid #3498db;
  transition: transform 0.2s, box-shadow 0.2s;
}

.m3u8-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.m3u8-info {
  margin-bottom: 10px;
}

.m3u8-url {
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
  word-break: break-all;
  margin-bottom: 5px;
  color: #2c3e50;
  line-height: 1.4;
}

.m3u8-time {
  font-size: 11px;
  color: #95a5a6;
}

.m3u8-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.copy-btn {
  background-color: #2ecc71;
  color: white;
}

.copy-btn:hover {
  background-color: #27ae60;
}

.download-btn {
  background-color: #e74c3c;
  color: white;
}

.download-btn:hover {
  background-color: #c0392b;
}

/* 底部样式 */
.footer {
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
}

.footer p {
  font-size: 11px;
  color: #95a5a6;
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  border-radius: 4px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-out;
}

.notification.success {
  background-color: #2ecc71;
}

.notification.error {
  background-color: #e74c3c;
}

.notification.fade-out {
  animation: fadeOut 0.3s ease-in;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* 响应式设计 */
@media (max-width: 400px) {
  body {
    min-width: 320px;
  }
  
  .container {
    padding: 10px;
  }
  
  .header h2 {
    font-size: 16px;
  }
  
  .m3u8-url {
    font-size: 12px;
  }
}

/* 滚动条样式 */
.results-section::-webkit-scrollbar {
  width: 6px;
}

.results-section::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.results-section::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.results-section::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}